Skip to content

Emit nested qualifier annotations as instantiation expressions - #2140

Open
mayokunyusuf wants to merge 1 commit into
square:masterfrom
mayokunyusuf:fix/nested-qualifier-annotations
Open

mayokunyusuf wants to merge 1 commit into
square:masterfrom
mayokunyusuf:fix/nested-qualifier-annotations

Conversation

@mayokunyusuf

Copy link
Copy Markdown

When DelegateKey generates direct annotation instantiation expressions (setOf(OuterAnnotation(...))), nested KSAnnotation arguments converted via KSAnnotation.toAnnotationSpec() were added directly as AnnotationSpec literals, causing KotlinPoet to emit a leading @ prefix (@InnerAnnotation(...)) inside the instantiation call and fail compilation.

This updates addValueToBlock in KspUtil to format nested KSAnnotation values with asInstantiationExpression().

Closes #1581.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ver. 1.14.0] Adapter generation fails if JsonQualifier has nested annotations

1 participant